﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddTag.aspx.cs" Inherits="Touch2Like.Web.Customer.Popup.AddTag" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" href="/css/main.css" type="text/css" />
    <link href="/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <script src="/js/jquery.js" type="text/javascript"></script>
    <script src="../../js/basic.js" type="text/javascript"></script>
    <script type="text/javascript">
        jQuery(document).ready(function () {
            var tooltips = { 'taguid': '<div class="alert"><strong>Tag UID</strong> – It\'s a unique ID from the NFC tag.  You can retrieve that from Touch2Like desktop version.</div>',
                'alias': '<div class="alert"><strong>Alias</strong> – A name you can remember easily.</div>',
                'serviceurl': '<div class="alert"><strong>Destination Site</strong> – It’s an URL address that will be redirected to when someone touch your NFC tags. </div>',
                'eventtype': '<div class="alert"><strong>Event Type</strong> - Optional, you can choose Touch2Rate or your choices. </div>',
                'music': '<div class="alert"><strong>Music</strong> -   </div>'
            };
            $(".ttip").hover(function () {
                $("#tooltip").html(tooltips[$(this).attr("tooltip")]);
            }, function () {
                $("#tooltip").html("");
            });

            $("#dl_TagType").change(function () {
                if ($(this).val() == "Touch2Rate") {
                    $("#tb_ServiceURL").attr("disabled", "disabled");
                } else {
                    $("#tb_ServiceURL").removeAttr("disabled");
                }
            });

            if ($("#dl_TagType").val() == "Touch2Rate") {
                $("#tb_ServiceURL").attr("disabled", "disabled");
            } else {
                $("#tb_ServiceURL").removeAttr("disabled");
            }
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="padding: 8px">
        <table style="height: 150px;">
            <tr>
                <td align="right" width="120">
                    <span tooltip='taguid' class="ttip">Tag UID: </span>
                </td>
                <td>
                    <span tooltip='taguid' class="ttip">
                        &nbsp;<asp:TextBox ID="tb_TagUID" runat="server" Width="300px"></asp:TextBox></span>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <span tooltip='alias' class="ttip">Alias: </span>
                </td>
                <td>
                    <span tooltip='alias' class="ttip">
                        &nbsp;<asp:TextBox ID="tb_Alias" runat="server" Width="300px"></asp:TextBox></span>
                </td>
            </tr>
            <tr>
                <td align="right" width="120">
                    <span tooltip='eventtype' class="ttip">Event Type: </span>
                </td>
                <td>
                    <span tooltip='eventtype' class="ttip">
                        &nbsp;<asp:DropDownList ID="dl_TagType" runat="server" Width="315px" Height="40px">
                            <asp:ListItem></asp:ListItem>
                            <asp:ListItem>Touch2Rate</asp:ListItem>
                            <asp:ListItem>Touch2Play</asp:ListItem>
<%--                            <asp:ListItem>Touch2Link</asp:ListItem>--%>
                        </asp:DropDownList>
                    </span>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <span tooltip='serviceurl' class="ttip">Destination: </span>
                </td>
                <td>
                    <span tooltip='serviceurl' class="ttip">
                        &nbsp;<asp:TextBox ID="tb_ServiceURL" runat="server" Width="300px"></asp:TextBox></span>
                </td>
            </tr>
<%--            <tr>
                <td align="right" width="120">
                    <span tooltip='music' class="ttip">Music: </span>
                </td>
                <td>
                    <span tooltip='music' class="ttip">
                        <asp:TextBox ID="TextBox2" runat="server" Width="300px"></asp:TextBox></span>
                </td>
            </tr>--%>
            <tr>
                <td align="right">
                </td>
                <td>
                    <asp:Label ID="lb_Remove" runat="server" Text="Are you sure to remove this tag?"
                        Visible="false"></asp:Label>
                    <br />
                    <div style="display:none">
                        <asp:Button ID="btn_Submit" runat="server" CssClass="Submit" Text="Save" OnClick="btn_Submit_Click" />
                        <asp:Button ID="btn_Remove" runat="server" Text="Remove" CssClass="Submit" OnClick="btn_Remove_Click"
                            Visible="false" />
                        <input type="button" id="btn_Cancel" class="Submit Cancel" value="Cancel" onclick="parent.hideDialog();" />
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td id="tooltip">
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
